package com.hxkj.client.service;

import com.github.pagehelper.PageInfo;
import com.hxkj.domain.po.UserLoginHistory;
import com.platform.common.domain.result.ParameterDataStruct;
import com.platform.common.domain.result.ResultDataStruct;
import com.platform.common.domain.result.ResultMessageStruct;
import org.springframework.cloud.netflix.feign.FeignClient;
import org.springframework.http.MediaType;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;

/**
 * created by kezhijie on 2018/8/28 10:44.
 * email to kezhijie@hxoss.com
 */
@FeignClient(name = "cms-user-center")
public interface UserLoginHistoryServiceClient extends BaseClient {

    /**
     * 获取用户登录历史信息
     * @param parameterDataStruct
     * @return
     */
    @RequestMapping(value = "/loginHistory/get", method = RequestMethod.POST, consumes = MediaType.APPLICATION_JSON_UTF8_VALUE)
    ResultDataStruct<PageInfo> get(@RequestBody ParameterDataStruct<UserLoginHistory> parameterDataStruct);

    /**
     * 记录用户登录信息
     * @param userLoginHistory
     * @return
     */
    @RequestMapping(value = "/loginHistory/record", method = RequestMethod.POST, consumes = MediaType.APPLICATION_JSON_UTF8_VALUE)
    ResultMessageStruct record(@RequestBody UserLoginHistory userLoginHistory);
}
